//
//  LineGraphView.h
//  MindView
//
//  Created by NeuroSky on 10/13/11.
//  Copyright 2012. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <Accelerate/Accelerate.h>
#import <AVFoundation/AVFoundation.h>


#define DECIMATE 2
#define LINE_WIDTH 1.0
#define CARDIO_SCALER 0.3

@interface LineGraphView : UIView {

    int dataRate;
    
    int index;
    
    BOOL newData;
    int decimateCount;
    
    UIBezierPath *smallGrid;
    UIBezierPath *grid;
    UIBezierPath *path;
    UIBezierPath *cursor;
    
    NSLock *dataLock;

    NSThread *redraw;
    
    UIColor * __weak backgroundColor;
    UIColor * __weak lineColor;
    UIColor * __weak cursorColor;
    
@public
        BOOL cursorEnabled;
        BOOL gridEnabled;
        double scaler;
        double xAxisMin;
        double xAxisMax;
        double yAxisMin;
        double yAxisMax;
    
 
    
}



- (CGPoint)point2PixelsWithXValue:(double) xValue yValue:(double) yValue;

- (double)addValue:(double) value;

- (void)cleardata;

@property(strong,atomic)NSMutableArray  *data;

@property (weak) UIColor * backgroundColor;
@property (weak) UIColor * lineColor;
@property (weak) UIColor * cursorColor;


@end
